/**
 * Created by zzw on 2016/8/7.
 * 工厂方法
 */

var Factory  = function(s1,d1,w1){
    var obj = new Object();
     obj.s1 = s1;
     obj.d1 = d1;
     obj.w1 = w1;
     obj.say = function() {
         console.log("say Hello World");
     }
    return obj;
}

console.log(Factory("张三",12,"郁闷"));
console.log(Factory("小明",23,"谁是谁"));
